package com.wf.course.service.impl;

import com.utils.page.PageBean;
import com.wf.course.dao.IPushMapper;
import com.wf.course.model.comm.PushLog;
import com.wf.course.service.IPushService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(rollbackFor = Exception.class)
public class IPushServiceImpl implements IPushService {

    @Autowired
    private IPushMapper pushMapper;

    @Override
    public Integer addLog(PushLog pushLog) {
        return pushMapper.addLog(pushLog);
    }

    @Override
    public void list(PageBean<PushLog> pageBean) {
        pageBean.setResults(pushMapper.list(pageBean));
        pageBean.setTotalCount(pushMapper.count(pageBean));
    }
}
